import {
  splitToLength,
  BoolStrWithBoolen,
  BoolStrWithNumber,
} from '../../../Utils/common'

/**
 * 季节性
 */
export function sub4(data) {
  console.log('************convertWithSub4-1 in************************')
  const { attr46, attr47, attr48 } = data

  let str = ''
  str += attr46to47Convert(attr46, attr47)

  if (attr48) str += `其他：${attr48}。`
  console.log('************convertWithSub4-1 out************************')
  return str
}

function attr46to47Convert(attr46, attr47) {
  if (!attr47) {
    return '症状与季节无明显相关。'
  } else if (attr46 && attr47) {
    return `在${attr47}好发。`
  }
  return ''
  // 春季 夏季 秋季 冬季
  // spring summer fall winter
  // if (splitToLength(str, 2)) {
  //   return ['spring', 'summer', 'fall', 'winter']
  // } else {
  //   const array = []
  //   if (str.includes('春季')) array.push('spring')
  //   if (str.includes('夏季')) array.push('summer')

  //   if (str.includes('秋季')) array.push('fall')
  //   if (str.includes('冬季')) array.push('winter')
  //   return array
  // }
}
